package leetcode;

import java.util.Scanner;

/**
 * ClassName: BaiduT1
 * Package: leetcode
 * Description:
 *
 * @Author wjn
 * @Create 2025/9/2 19:19
 * @Version 1.0
 */
public class BaiduT1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        // 读取输入的整数n
        int n = scanner.nextInt();
        int[] a = new int[n];
        long minA = Long.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            a[i] = scanner.nextInt();
        }

        if(n > 0) {
            int constantC = a[0];
            StringBuilder sb = new StringBuilder();
            for(int i = 0; i < n; i++){
                int b_i = a[i] ^ constantC;
                sb.append(b_i);
                if(i < n - 1){
                    sb.append(" ");
                }
            }
            System.out.println(sb.toString());
        }

        scanner.close();
    }
}
